<?php
html::printPath(array(
		'orgPerson.form-title' => '/org/orgPerson/listing',
		format::personFullName($person) => ''
), 'orgPerson-display-desc');
$msg->printMessages();
echo html::entityInfoIcon('person', $person, 'id');
?>

<div class="commandListFlow ui-helper-clearfix">
	<ul class="commandList">
	    <li class="editLi"><?php echo html::anchor('org/orgPerson/edit?id=' . $person['id'], text::get('person-editThis')) ?></li>
	</ul>
	
	<ul class="commandList">
		<li class="suCommand"><?php echo html::anchor('org/orgPerson/becomePerson?id=' . $person['id'], text::get('person-becomePerson'), array('title' => text::get('person-becomePerson-hint'))) ?></li>
	</ul>
</div>

<?php
$fullName = $person['title'] . ' ' . $person['first_name'] . ' ' . $person['other_names'] . ' ' . $person['last_name'];

$fb = new FormBuilder('person', $person);
$fb->displayOnly();
$fb->display('full_name')->value($fullName)->identifyingValue();
$fb->text('yoga_name');
$fb->radioButtons('gender', array('M','F'), 'person.gender-');
$fb->date('birth_date');

$fb->delimiter(text::get('person-idetificationPapers'));
$fb->comboBox('idcard_type', $idcardTypeOptions);
$fb->text('idcard_number');
$fb->comboBox('citizenship_code', $countryOptions)->hint();

$fb->delimiter(text::get('person-permanentAddress'));
$fb->text('street');
$fb->text('city');
$fb->text('postal_code');
$fb->display('country_code')->value($person['country_name']);

$fb->delimiter();
$fb->display('country_of_residence_code')->value($person['country_of_residence_name']);

$fb->spacer();
$fb->text('telephone');
$fb->text('email');
$fb->yesNoBox('is_ztp');
$fb->write();
